home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / g / gnu_c / mnthlb44.zoo / patch / makefile
Encoding:
Makefile  |  1994-03-07  |  5.7 KB  |  171 lines

  1. # Makefile for hacked MiNTlib for Heat-n-Serve/Sozobon C, version 1.33i
  2. # and above.  This makefile works with the make provided with 1.40 and
  3. # up, and less well with the make provided with 1.33i
  4.  
  5. # Where to install libraries.
  6. # LIBDIR = c:\sozobon\lib
  7. LIBDIR = u:\lib
  8.  
  9. # You might want any or all of these; Sozobon's make predefines most of them.
  10. AR = ar
  11. #CP = cp
  12. #RM = rm -f
  13. MAKE = make
  14.  
  15. # A trick to build a v1.40-compatible library with a v2.00 or higher
  16. # compiler -- either uncomment this line or build the target
  17. # "short_names".  This isn't necessary unless you're building an old
  18. # library with a new compiler (and hopefully by the next release it
  19. # won't be necessary at all).
  20. #SHORTNAMES = -8
  21. AFLAGS = $(SHORTNAMES)
  22.  
  23.  
  24. # To build the .cpp files, you'll need my stand-alone preprocessor,
  25. # which should be available where you got this archive.
  26. CPP = cpp
  27. CPPFLAGS = -P -Wno-bad-chars -D__SOZOBON__ -D__MSHORT__
  28.  
  29. # 1.33i's top apparently takes about 30 minutes on doprnt.c; if you don't
  30. # want to wait that long, use the alternate definition of NOOPT. 
  31. # Unfortunately, there is an optimizer bug in 1.40 that bites here; if
  32. # you're using that version, you must use the non-optimizing version.
  33. CFLAGS = -O -D__NO_FLOAT__ -DNDEBUG $(SHORTNAMES)
  34. #NOOPT = -D__NO_FLOAT__ -DNDEBUG $(SHORTNAMES)    # without optimizing
  35. NOOPT = $(CFLAGS)                # with optimizing
  36.  
  37. # If you prefer more "standard" Unix-like names for your library files, use
  38. # the alternate definitions of CRT0 and LIBC -- assuming, of course, that
  39. # you have a cc that recognizes those names!
  40. # CRT0 = crt0.o
  41. # LIBC = libc.a
  42. CRT0 = dstart.o
  43. LIBC = dlibs.a
  44. LIBS = $(CRT0) $(LIBC) libtermcap.a
  45.  
  46. all : $(LIBS)
  47.  
  48. # These are in alphabetical order to make it easy to find one.
  49. OBJECTS = \
  50.     a64l.o abort.o abs.o access.o alarm.o alloca.o alphasor.o \
  51.     atexit.o atoi.o atol.o \
  52.     bcmp.o bcopy.o binmode.o bsearch.o buffindf.o bzero.o \
  53.     calloc.o cfgetisp.o cfgetosp.o cfsetisp.o cfsetosp.o chdir.o \
  54.     chmod.o chown.o clock.o close.o closedir.o console.o crtinit.o \
  55.     ctermid.o ctime.o ctype.o cuserid.o \
  56.     defmode.o difftime.o div.o div.o do_lock.o do_stat.o doprnt.o \
  57.     dup.o dup2.o \
  58.     enoent.o eprintf.o execl.o execle.o execp.o execv.o execve.o \
  59.     fclose.o fcntl.o fdopen.o fflush.o ffs.o fgetc.o fgetpos.o \
  60.     fgets.o filbuf.o findfile.o flock.o fopen.o fopen_i.o fopenp.o \
  61.     fork.o fprintf.o fputc.o fputs.o fread.o freopen.o frwbin.o \
  62.     fscanf.o fseek.o fsetpos.o fstat.o ftell.o ftw.o fungetc.o \
  63.     fwrite.o \
  64.     getbuf.o getcwd.o getdtabl.o getegid.o getenv.o geteuid.o \
  65.     getgid.o getgroup.o gethostn.o getlogin.o getopt.o getpages.o \
  66.     getpass.o getpid.o getppid.o getpw.o getrusag.o gets.o getuid.o \
  67.     getw.o getwd.o grp.o \
  68.     heapbase.o \
  69.     ic.o ident.o ig.o il.o inistack.o initsig.o inode.o ioctl.o ip.o \
  70.     isatty.o isctty.o iw.o \
  71.     kill.o killpg.o \
  72.     l64a.o labs.o ldiv.o linea.o link.o lmalloc.o localtim.o lockf.o \
  73.     lseek.o lstat.o ltoa.o \
  74.     main.o malloc.o memccpy.o memchr.o memcmp.o memset.o mkdir.o \
  75.     mkfifo.o mknod.o mktemp.o \
  76.     nice.o nlist.o \
  77.     obstack.o open.o opendir.o osbind.o \
  78.     pause.o perror.o pgrp.o pipe.o popen.o printf.o psignal.o putenv.o \
  79.     putpwent.o puts.o \
  80.     qsort.o \
  81.     raise.o rand.o random.o read.o readdir.o realloc.o regexp.o \
  82.     regsup.o rename.o rewind.o rewinddi.o rmdir.o \
  83.     sbrk.o scandir.o scanf.o seekdir.o select.o setbuf.o setegid.o \
  84.     seteuid.o setgid.o setjmp.o setlocal.o setregid.o setreuid.o \
  85.     setrlimi.o setuid.o setvbuf.o sgtty.o sigactio.o sigblock.o \
  86.     siglist.o signal.o sleep.o sozolong.o sozulong.o spawn.o \
  87.     spawnve.o spawnvp.o sprintf.o sscanf.o stat.o statfs.o stksiz.o \
  88.     strcat.o strchr.o strcmp.o strcoll.o strcpy.o strcspn.o strdup.o \
  89.     strerror.o strftime.o stricmp.o strlen.o strlwr.o strncat.o \
  90.     strncmp.o strncpy.o strnicmp.o strpbrk.o strrchr.o strrev.o \
  91.     strspn.o strstr.o strtok.o strtol.o strtoul.o strupr.o symlink.o \
  92.     sync.o sysconf.o system.o sysvar.o \
  93.     tcattr.o tcbreak.o tcdrain.o tcflow.o tcflush.o tcpgrp.o \
  94.     telldir.o textio.o thread.o time.o timeoday.o times.o tmpfile.o \
  95.     tmpnam.o toxxx.o truncate.o ttyname.o \
  96.     uidgid.o uname.o unlink.o unx2dos.o utime.o utmp.o \
  97.     vfork.o vfprintf.o vfscanf.o vprintf.o vscanf.o \
  98.     wait.o wait3.o waitpid.o wcmb.o wcscat.o wcscmp.o wcscpy.o \
  99.     wcslen.o wnull.o write.o wtmp.o
  100.  
  101. # Rule to handle .cpp files
  102. .SUFFIXES: .cpp
  103.  
  104. .cpp.s:
  105.     $(CPP) $(CPPFLAGS) $< $*.i
  106.     mit2mot $*.i
  107.     $(RM) $*.i
  108.  
  109. .cpp.o:
  110.     $(CPP) $(CPPFLAGS) $< $*.i
  111.     mit2mot $*.i
  112.     $(RM) $*.i
  113.     $(AS) $(AFLAGS) $*.s
  114.  
  115. # Make sure the targets get built if necessary
  116. alloca.o: alloca.cpp
  117. bcopy.o: bcopy.cpp
  118. crt0.o: crt0.cpp
  119. osbind.o: osbind.cpp
  120. setjmp.o: setjmp.cpp
  121. vfork.o: vfork.cpp
  122.  
  123. # bzero.cpp contains both bzero() and memset().
  124. bzero.o: bzero.cpp
  125.     $(CPP) $(CPPFLAGS) -DLbzero bzero.cpp bzero.i
  126.     mit2mot bzero.i
  127.     $(RM) bzero.i
  128.     $(AS) $(AFLAGS) bzero.s
  129.  
  130. memset.o: bzero.cpp
  131.     $(CPP) $(CPPFLAGS) -DLmemset bzero.cpp memset.i
  132.     mit2mot memset.i
  133.     $(RM) memset.i
  134.     $(AS) $(AFLAGS) memset.s
  135.  
  136. # If you're using 1.33i's make or ar, this command will fail spectacularly
  137. # for the first build; you'll have to build it by hand, a few files
  138. # at a time.  After that, if you only change a few files at a time,
  139. # you shouldn't have problems.  Later versions are compiled with ARGV
  140. # and have no problems.
  141. $(LIBC) : $(OBJECTS)
  142.     $(AR) rv $@ $?
  143.  
  144. doprnt.o: doprnt.c
  145.     $(CC) $(NOOPT) -c $?
  146.  
  147. libtermcap.a : termcap.o
  148.     $(AR) rv $@ $?
  149.  
  150. # this is ugly, but I can't think of a way around it without risking the TOS
  151. # "copy file to itself" bug.  If you have CRT0 = crt0.o, this rule will
  152. # never be used anyway.
  153. dstart.o : crt0.o
  154.     $(CP) $? $@
  155.  
  156. # The trick described above -- force v2.00+ compilers to generate short
  157. # identifiers compatible with v1.40 and before.
  158. short_names:
  159.     $(MAKE) SHORTNAMES=-8
  160.  
  161. clean :
  162.     $(RM) *.o
  163.  
  164. realclean : clean
  165.     $(RM) $(LIBS)
  166.  
  167. install : $(LIBS)
  168.     $(CP) $(LIBC) $(LIBDIR)
  169.     $(CP) $(CRT0) $(LIBDIR)
  170.     $(CP) libtermcap.a $(LIBDIR)
  171.